package com.loveprogrammer.eternity.skill.support.states;

import com.loveprogrammer.eternity.model.Character;
import com.loveprogrammer.eternity.model.console.ConsolePrint;

import java.util.List;

/**
 * @version 1.0.0
 * @description: 技巧增幅
 * @author: eric
 * @date: 2022-08-16 16:45
 **/
public class TechIncrState extends AbstractPositiveState{

    private final int increment;

    public TechIncrState(Character character, List<? extends Character> camp, int increment) {
        super(character,camp);
        this.increment = increment;
    }

    @Override
    public int id() {
        return 14;
    }

    @Override
    public String name() {
        return "增加技巧";
    }

    @Override
    public String desc() {
        return "增加技巧";
    }

    @Override
    public void doReset() {
//        ConsolePrint.publishMessage(string + getCharacter().getName() + "(" + getCharacter().getCurrentHp() + "/" +
//                getCharacter().getHpMax() + ")" + "技巧增幅结束");
        getCharacter().setTechnique(getCharacter().getTechnique() - increment);
    }

    @Override
    public int counterId() {
        return -1;
    }

    @Override
    public void run() {
        // 如果已经死了就算了
        if(this.getCharacter().checkDead()){
            return;
        }
        // 否则
        else{
            // 一次性的操作
        }
    }
}
